Skip to main content
Version: 2.0

Download File

STEP 1: First API Call

  • API Endpoints: /access-api/v1/reports
  • Authentication: Bearer token. Please refer section Token Based Authentication.
  • Method: POST
  • Payload: Passed in body as a json object
  • Response: Success - Download link. This link would be valid for next 30 minutes only. Error -

Payload Structure:

{
"compressed": true,
"columns": [
"channel",
"appid",
"responseid",
"campaignName",
"conversationid",
"dlrconversationorigin",
"dlrerrorcode",
"entTransid",
"messageid",
"mimetype",
"msgcontent",
"msgtype",
"msisdn",
"requestType",
"sender",
"templateid",
"transactionid",
"trafficsource"
],
"filters": {
"source": [
"<source value>"
],
"channel": [
"rcs",
"soip",
"sms",
"truecaller",
"wa"
],
"appId": [
"<appid_value1>",
"<appid_value2>"
],
"requestReceivedTime": [
"<startDateEpocTimeUTCInSeconds>",
"<endDateEpocTimeUTCInSeconds>"
],
"responseId": [
"1",
"2",
"3",
"4"
],
"campaignName": [
"<campaignName1>",
"<campaignName2>"
],
"templateId": [
"<template1>",
"<template2>"
],
"dlrconversationorigin": [
"business_initiated",
"marketing",
"service",
"user_initiated",
"utility"
]
}
}

Payload structure rules:

  • columns
    • Mandatory
    • Accepts a list
    • Could not be empty
    • Possible values of the column field are metioned in the payload structure
  • filters
    • Mandatory
    • Accepts an object
    • Could not be null or empty
    • Must contain channel, appid, requestReceivedTime
  • filter values
    • Filter object contain keys with columns that needs to be filtered
    • The filter values of the column is passed as a list and this list cannot be empty
    • It is mandatory to pass channel, appid, requestReceivedTime
  • source
    • Only applicable for conversation API traffic (it will be skipped for others)
    • Takes only one value in the list and can't be empty (if more than one value is passed the API fails at backend)

STEP 2: Second API Call

  • API Endpoints: Response link from step 1 (/access-api/v1/download/:filename)
  • Authentication: Bearer token (Same as step 1)
  • Method: GET
  • Response: It returns file status. If the file is completed and ready to be downloaded, then it returns the file. The file contains the data requested by the user. It will always have dlrstatus.